import request from '@/utils/request'

// 查询请假审批单列表
export function listLeaveApproval(query) {
  return request({
    url: '/hr/leaveApproval/list',
    method: 'get',
    params: query
  })
}

// 查询请假审批单详细
export function getLeaveApproval(id) {
  return request({
    url: '/hr/leaveApproval/' + id,
    method: 'get'
  })
}

// 新增请假审批单
export function addLeaveApproval(data) {
  return request({
    url: '/hr/leaveApproval',
    method: 'post',
    data: data
  })
}

// 修改请假审批单
export function updateLeaveApproval(data) {
  return request({
    url: '/hr/leaveApproval',
    method: 'put',
    data: data
  })
}
// 修改请假审批单
export function updateLeaveApproval2(data) {
  return request({
    url: '/hr/leaveApproval/updateLeaveApproval2',
    method: 'put',
    data: data
  })
}

// 删除请假审批单
export function delLeaveApproval(id) {
  return request({
    url: '/hr/leaveApproval/' + id,
    method: 'delete'
  })
}
